package com.newtouch.xcd.cms.service;

import com.newtouch.xcd.cms.entity.Distribution;
import com.baomidou.mybatisplus.extension.service.IService;
import com.newtouch.xcd.mft.vo.BeneficiaryItem;

import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author dongyuefeng
 * @since 2020-06-11
 */
public interface DistributionService extends IService<Distribution> {

    /**
     * 根据合同号查找受益人列表，去重，返回的数据按受益人类别排序
     *
     * @param contractId 合同号ID
     * @return
     */
    List<BeneficiaryItem> queryBeneficiaryItemByContractId(String contractId);

    /**
     * 根据合同号，返回利益分配方案明细
     *
     * @param contractId 合同号ID
     * @return
     */
    List<Distribution> queryDistributionByContractId(String contractId);

    /**
     * 根据 合同号+受益人+分配的项目，返回利益分配详情
     *
     * @param contractId 合同号ID
     * @return
     */
    Distribution queryBenefitDistributionByContractIdAndBeneficiaryAndDistributionProject(String contractId, String beneficiary, String distributionProject);

    /**
     * 检查合同记录
     * @return
     */
    List<Distribution> checkDistribution();
}
